package com.huilian.iotbox.client.dao;

import com.huilian.iotbox.data.dto.CommonOrderDto;
import com.huilian.iotbox.data.dto.ConsumeRecordDto;
import com.huilian.iotbox.data.dto.MemberDto;
import com.huilian.iotbox.data.dto.MemberStoreDto;
import com.huilian.iotbox.data.po.Member;
import com.huilian.iotbox.data.vo.ConsumeRecordMiniVo;
import com.huilian.iotbox.data.vo.MemberVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MemberDao {
    Member getMemberByKeyWordByALiUnionId(@Param("keyWord") String keyWord);

    Integer insert(Member memberInfo);

    MemberDto queryById(Long memberId);

    MemberVo queryInfoById(MemberDto memberDto);

    int updateById(Member m);

    List<CommonOrderDto> findMemberOrderList(CommonOrderDto commonOrderDto);

    /**
     * 查询单个订单详情
     */
    CommonOrderDto findMemberOrderOne(CommonOrderDto commonOrderDto);

    void delete(Long id);

    List<Member> findAllMemberByMobile(@Param("mobile") String mobile);

    Member getMemberByWeChatUnionId(String keyWord);

    Member getMemberByWeChatOpenId(String openId);

    Member findUnionIdThereById(Long memberId);

    Member getMemberByWeChatOfficialAccountOpenId(String officialAccountOpenId);

    List<Member> findAllMemberByCondition(Member memberCondition);
}
